load("@rules_java//java:defs.bzl", "java_library")
load("//:cel_android_rules.bzl", "cel_android_library")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = ["//:internal"],
)

java_library(
    name = "internal",
    exports = ["//common/src/main/java/dev/cel/common/internal"],
)

java_library(
    name = "comparison_functions",
    exports = ["//common/src/main/java/dev/cel/common/internal:comparison_functions"],
)

cel_android_library(
    name = "comparison_functions_android",
    exports = ["//common/src/main/java/dev/cel/common/internal:comparison_functions_android"],
)

java_library(
    name = "converter",
    # used_by_android
    exports = ["//common/src/main/java/dev/cel/common/internal:converter"],
)

java_library(
    name = "dynamic_proto",
    exports = ["//common/src/main/java/dev/cel/common/internal:dynamic_proto"],
)

java_library(
    name = "proto_lite_adapter",
    exports = ["//common/src/main/java/dev/cel/common/internal:proto_lite_adapter"],
)

java_library(
    name = "proto_equality",
    exports = ["//common/src/main/java/dev/cel/common/internal:proto_equality"],
)

java_library(
    name = "file_descriptor_converter",
    exports = ["//common/src/main/java/dev/cel/common/internal:file_descriptor_converter"],
)

java_library(
    name = "errors",
    exports = ["//common/src/main/java/dev/cel/common/internal:errors"],
)

java_library(
    name = "env_visitor",
    exports = ["//common/src/main/java/dev/cel/common/internal:env_visitor"],
)

java_library(
    name = "default_instance_message_factory",
    exports = ["//common/src/main/java/dev/cel/common/internal:default_instance_message_factory"],
)

java_library(
    name = "default_instance_message_lite_factory",
    exports = ["//common/src/main/java/dev/cel/common/internal:default_instance_message_lite_factory"],
)

java_library(
    name = "well_known_proto",
    exports = ["//common/src/main/java/dev/cel/common/internal:well_known_proto"],
)

cel_android_library(
    name = "well_known_proto_android",
    exports = ["//common/src/main/java/dev/cel/common/internal:well_known_proto_android"],
)

java_library(
    name = "proto_message_factory",
    exports = ["//common/src/main/java/dev/cel/common/internal:proto_message_factory"],
)

java_library(
    name = "default_message_factory",
    exports = ["//common/src/main/java/dev/cel/common/internal:default_message_factory"],
)

java_library(
    name = "cel_descriptor_pools",
    exports = ["//common/src/main/java/dev/cel/common/internal:cel_descriptor_pools"],
)

java_library(
    name = "cel_lite_descriptor_pool",
    exports = ["//common/src/main/java/dev/cel/common/internal:cel_lite_descriptor_pool"],
)

cel_android_library(
    name = "cel_lite_descriptor_pool_android",
    exports = ["//common/src/main/java/dev/cel/common/internal:cel_lite_descriptor_pool_android"],
)

java_library(
    name = "default_lite_descriptor_pool",
    exports = ["//common/src/main/java/dev/cel/common/internal:default_lite_descriptor_pool"],
)

cel_android_library(
    name = "default_lite_descriptor_pool_android",
    exports = ["//common/src/main/java/dev/cel/common/internal:default_lite_descriptor_pool_android"],
)

java_library(
    name = "safe_string_formatter",
    # used_by_android
    exports = ["//common/src/main/java/dev/cel/common/internal:safe_string_formatter"],
)

cel_android_library(
    name = "internal_android",
    exports = ["//common/src/main/java/dev/cel/common/internal:internal_android"],
)

java_library(
    name = "proto_java_qualified_names",
    exports = ["//common/src/main/java/dev/cel/common/internal:proto_java_qualified_names"],
)

java_library(
    name = "proto_time_utils",
    exports = ["//common/src/main/java/dev/cel/common/internal:proto_time_utils"],
)

cel_android_library(
    name = "proto_time_utils_android",
    exports = ["//common/src/main/java/dev/cel/common/internal:proto_time_utils_android"],
)
